package com.projecy.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.projecy.system.model.SysMenu;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface SysMenuMapper extends BaseMapper<SysMenu> {

    List<SysMenu> getMenuTree(@Param("roles") List<String> roles);//获取菜单树


    List<String> getMenuUrlByRole(@Param("roles") List<String> roles);//通过角色获取url


    List<String> getMenuTreeByRoleId(@Param("roleId") String roleId);//获取角色菜单树


    List<SysMenu> getAllMenusByChildId(@Param("menuId") Long menuId);//通过菜单Id获取所有上级菜单

    List<SysMenu> getByid(@Param("menuId") Long menuId);//通过菜单Id获取上级菜单

    List<SysMenu> getByids(@Param("menuId") Long menuId);//通过菜单Id获取上级菜单


}
